added SSCLI 1.0
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / VBEFEntityDataModel / MainModule.vb
blob98b3b754a9ff86b3035ddcd4daac8e735c29e01d
1 '****************************** Module Header ******************************'
2 ' Module Name: MainModule.vb
3 ' Project: VBEFEntityDataModel
4 ' Copyright (c) Microsoft Corporation.
6 ' The VBEFEntityDataModel example illustrates how to work with EDM in various
7 ' ways. It includes many to many association, one to many association, one to
8 ' one association, table merging, table splitting, table per hierarchy
9 ' inheritance, and table per type inheritance. In the example, you will see
10 ' the insert, update and query operations to entities.
12 ' This source is subject to the Microsoft Public License.
13 ' See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
14 ' All other rights reserved.
16 ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
17 ' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
18 ' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
19 '***************************************************************************'
21 #Region "Imports directives"
22 Imports VBEFEntityDataModel.VBEFEntityDataModel.TableSplitting
23 Imports VBEFEntityDataModel.VBEFEntityDataModel.TablePerType
24 Imports VBEFEntityDataModel.VBEFEntityDataModel.TablePerHierarchy
25 Imports VBEFEntityDataModel.VBEFEntityDataModel.TableMerging
26 Imports VBEFEntityDataModel.VBEFEntityDataModel.One2One
27 Imports VBEFEntityDataModel.VBEFEntityDataModel.One2Many
28 Imports VBEFEntityDataModel.VBEFEntityDataModel.Many2Many
29 #End Region
32 Module MainModule
33 Sub Main()
35 Console.WriteLine("Many-to-Many test:")
37 ' Perform the insert, update and query operations to entities
38 ' with many to many association.
39 Many2ManyClass.Many2ManyTest()
41 Console.WriteLine()
43 Console.WriteLine("One-to-Many test:")
45 ' Perform the insert, update and query operations to entities
46 ' with one to many association.
47 One2ManyClass.One2ManyTest()
49 Console.WriteLine()
51 Console.WriteLine("One-to-One test:")
53 ' Perform the insert, update and query operations to entities
54 ' with one to one association.
55 One2OneClass.One2OneTest()
57 Console.WriteLine()
59 Console.WriteLine("Table merging test:")
61 ' Perform the query operation to merged entity
62 TableMergingClass.TableMergingTest()
64 Console.WriteLine()
66 Console.WriteLine("Table splitting test:")
68 ' Perform the insert and query operations in separate table
69 TableSplittingClass.TableSplittingTest()
71 Console.WriteLine()
73 Console.WriteLine("Table-Per-Hierarchy inheritance test:")
75 ' Perform the query operation to entities in TablePerType
76 TPTClass.TPTTest()
78 Console.WriteLine()
80 Console.WriteLine("Table-Per-Type inheritance test:")
82 ' Perform the query operation to entities in TablePerHierarchy
83 TPHClass.TPHTest()
85 Console.ReadLine()
86 End Sub
88 End Module